# Contributor: Marvin Preuss <marvin@xsteadfastx.org>
# Maintainer: Marvin Preuss <marvin@xsteadfastx.org>
pkgname=upmpdcli
pkgver=1.8.9
pkgrel=0
pkgdesc="upmpdcli is a UPnP Media Renderer front-end for MPD, the Music Player Daemon"
pkgusers="upmpdcli"
pkggroups="upmpdcli"
url="https://www.lesbonscomptes.com/upmpdcli"
arch="all"
license="LGPL-2.1-or-later"
options="!check"
makedepends="libupnpp-dev libmpdclient-dev libmicrohttpd-dev jsoncpp-dev"
subpackages="$pkgname-doc $pkgname-openrc"
install="$pkgname.pre-install"
source="$pkgname-$pkgver.tar.gz::https://www.lesbonscomptes.com/upmpdcli/downloads/upmpdcli-$pkgver.tar.gz
	$pkgname.initd
	$pkgname.conf"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc
	make
}

package() {
	make DESTDIR="$pkgdir" install

	install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
	install -Dm644 "$srcdir"/$pkgname.conf "$pkgdir"/etc/$pkgname.conf
	install -d -o upmpdcli -g upmpdcli "$pkgdir"/var/cache/upmpdcli
}

sha512sums="
f7fc474d91076acfe1d1482db6ea3e9a4a15612cfdef854e11721673f5822f1d2adf1b353b39bdbfbb6cbf869f4b6e8b6995c78e11555cd03c44140f4104b087  upmpdcli-1.8.9.tar.gz
f586c538abb51f373bf8a8277132694ad289f9c23de9389cb5c9cb67fdbec192529645b759f745ddeca3ce24893580b0ce0d344a8e75b3fd1edd021a0335f617  upmpdcli.initd
b6815c29e8c648fd7577f9137f1552dab96710e80458a19fc332c6382471c47fdc056c8e3e1353fc982610173e498b96df8fd18de93f5546773a22e02e58886d  upmpdcli.conf
"
